<?php
/**
 * Here is your custom functions.
 */

use support\Response;

function jsonSuccess(array $data = [])
{
    return json(['code'=>'0', 'msg'=>'', 'count'=>10, 'data'=>$data]);
}

function jsonFail(int $code = 100, string $msg = '操作失败')
{
    return json(['code'=>$code, 'msg'=>$msg, 'data'=>null]);
}